﻿using System.Web;
using System.Web.Mvc;
using System.Web.UI;
using Peak.Web.Controllers;
using System.Linq.Expressions;
using System;
using System.Web.Routing;

namespace Peak.Web
{
  public partial class _Default : Page
  {
    public void Page_Load(object sender, System.EventArgs e)
    {
      HttpContext.Current.RewritePath(Request.ApplicationPath, false);
      if (Request.AppRelativeCurrentExecutionFilePath.ToLower() != "~/default.aspx" || Request.AppRelativeCurrentExecutionFilePath == "~/")
      {
        Response.Redirect("~/Account.aspx/login");
        return;
      }
      IHttpHandler httpHandler = new MvcHttpHandler();
      httpHandler.ProcessRequest(HttpContext.Current);
    }   
  }
}
